package com.ibl.rover.lite.client.DatabaseSource;

import com.ibl.rover.lite.client.Helper.DatabaseBeanHelper;
import com.ibl.rover.lite.common.db.DatabaseManager;
import com.ibl.rover.lite.common.db.SQLLiteDatabaseImpl;

public class DataSourceFactory {

	public static DatabaseManager getResolverDataSource(
			DatabaseBeanHelper beanHelper) {

		switch (beanHelper.getDatabaseImpl()) {
		case SQLiteDatabase:
			return SQLLiteDatabaseImpl.getInstance(beanHelper);

		default:
			throw new IllegalArgumentException("[Database not supported]");
		}
	}
}
